/**
 * 
 */
package org.cuatrovientos.buylist;

import java.util.Scanner;

/**
 * main
 * @author teodor_mivovan
 * */
public class Main {

	/**
	 * @param args
	 */
	public static void main() {
		String[] list= new String[10]; 
        int option = 0;
        String line = "";
      
        
        BuyList.initializerVoid(list);

      
        Scanner reader = new Scanner(System.in);
        
       exit:
        do {
                BuyList.showMenu();
                line = reader.nextLine();
                option = Integer.parseInt(line);
        
                switch(option) {
                case 1:
                        BuyList.showsList(list);
                        break;
                
                case 2:
                        System.out.print("Introduzca nuevo elemento: ");
                        line = reader.nextLine();
                        BuyList.insertElement(list,line);
                        break;
                
                case 3: 
                        System.out.print("Introduzca la posicion: ");
                        line = reader.nextLine();
                        option=Integer.parseInt(line);
                        if (option <=9 && option >1) {
                                BuyList.deleteElement(list, option);
                        }
                        break;
        
                case 4:
                        break exit;  
        
                }
        } while(true);
          
       	}
	}


